//
//  HOTMessageChatForSendCell.m
//  Genpara
//
//  Created by zhang chunhui on 14-9-27.
//  Copyright (c) 2014年 zhangchh. All rights reserved.
//

#import "HOTMessageChatForSendProject.h"
#import "HOTBaseViewController.h"
#import "HOTCommWebViewController.h"

@implementation HOTMessageChatForSendProject

- (void)awakeFromNib
{
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    _sendBgImageView.image = [_sendBgImageView.image stretchableImageWithLeftCapWidth:20 topCapHeight:13];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setInfo:(NSDictionary *)info {
    
    self.projectUrlStr = [info objectForKey:@"contract_url"];
    self.projectId = [info objectForKey:@"id"];
}

- (IBAction)confirmBtnclicked:(id)sender {
    
    HOTUserInfo *userInfo = [HOTUserInfo defaultUser];

    HOTCommWebViewController *webViewC = [[HOTCommWebViewController alloc] initWithNibName:@"HOTCommWebViewController" bundle:nil url:[NSString stringWithFormat:@"%@&user_id=%@", self.projectUrlStr, userInfo.userId]];
    webViewC.title = @"発注書";
    [webViewC showToolBar:NO];
    [((UIViewController *)self.responder).navigationController pushViewController:webViewC animated:YES];
}
@end
